<?php

echo "<h1> Liste des camps du pays ".$pays->getNom()."</h1>";
$i=0;?>

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<?php
foreach ($camps as $camp) {
?>
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="heading<?php $i; ?>">
      <h4 class="panel-title">
        <a style="color:black;" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php $i; ?>" aria-expanded="true" aria-controls="collapse<?php $i; ?>">
          <?php echo $camp->getVille(); ?>
        </a>
      </h4>
    </div>
    <div id="collapse<?php $i; ?>" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading<?php $i; ?>">
      <div class="panel-body" style="color:black;">
          <table class="table">
          <tr><td>Camp de réfugié:</td><td><img src="<?php  echo $camp->getIsRefugie() ? $view['assets']->getUrl('Munter/Theme/images/check.png'):$view['assets']->getUrl('Munter/Theme/images/croix.png'); ?>" /> </td></tr>
        <tr><td>Centre de vaccination:</td><td><img src="<?php  echo $camp->getIsVaccination() ? $view['assets']->getUrl('Munter/Theme/images/check.png'):$view['assets']->getUrl('Munter/Theme/images/croix.png'); ?>" /> </td></tr>
        <tr><td>Centre de prévention:</td><td><img src="<?php  echo $camp->getIsPrevention() ? $view['assets']->getUrl('Munter/Theme/images/check.png'):$view['assets']->getUrl('Munter/Theme/images/croix.png'); ?>" /> </td></tr>
        <tr><td>Coordonnées GPS:</td><td>Lat:<?php  echo $camp->getGpsLat(); ?> Long:<?php  echo $camp->getGpsLong(); ?></td></tr>
          
        <tr><td>Capacité</td><td><?php echo count($camp->getRefugies()); ?> / <?php echo round(count($camp->getRefugies())*1.5); ?></td></tr> 
          </table>
          
      </div>
    </div>
  </div>
  

<?php
    $i++;
}//fin du for
echo '</div>';
